DeleteUser
Removes a user from the current protected range.
Syntax
expression.DeleteUser(sId);
expression
- A variable that represents a ApiProtectedRange class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
sId | Required | string | The user ID. |
Returns
bool
Example
This example changes the the user protected range.
var oWorksheet = Api.GetActiveSheet();
oWorksheet.AddProtectedRange("protectedRange", "$A$1:$B$1");
var protectedRange = oWorksheet.GetProtectedRange("protectedRange");
protectedRange.AddUser("userId", "name", "CanView");
protectedRange.DeleteUser("userId");